package com.sakura.util.thread.executors;/**
 * Created by apple on 2019/10/8.
 */

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author jixd
 * @Description
 * @Date 2019/10/8 3:05 PM
 * @Version 1.0
 **/
public class ExecutorsTest {
    private static ExecutorService executor = Executors.newFixedThreadPool(15);

    public static void main(String[] args) {
        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            executor.execute(new SubThread());
        }
    }
}

class SubThread implements Runnable {
    @Override
    public void run() {
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            //do nothing
        }
    }

}
